<!--
   Copyright 2024 The Google Research Authors.
  
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at
  
       http://www.apache.org/licenses/LICENSE-2.0
  
   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
-->

<!-- You must include this JavaScript file -->
<script src="https://assets.crowd.aws/crowd-html-elements.js"></script>

<!-- For the full list of available Crowd HTML Elements and their input/output documentation,
      please refer to https://docs.aws.amazon.com/sagemaker/latest/dg/sms-ui-template-reference.html -->

<!-- You must include crowd-form so that your task submits answers to MTurk -->
<crowd-form answer-format="flatten-objects">

    <crowd-instructions link-text="View instructions" link-type="button">
        <short-summary>
            <p>Summarize the story with one sentence.</p>
        </short-summary>

        <detailed-instructions>
            <h3>Summarize the story with one sentence.</h3>
            <p>
              Read the story, and write a single sentence that summarizes
              the story. The writing level and style should be comparable to
              the story. Use proper grammar, punctuation, and capitalization.
              
              The summary should be significantly shorter than the story. Do not try to retain every detail of the story in a very long (or run-on) sentence and prefer simple sentences.
              Avoid copying/pasting large segments of the story.
        </p>
        </detailed-instructions>

        <positive-example>
            <h3>Story</h3>
            <p>You bought a pair of shoes online but they don't fit
            George had to get to work.  His car broke down. He took the bus there.  The bus broke down too. He ended up calling his work place that he can't come.
            </p>

            <h3>Response</h3>
            <p>
             George’s car broken down and couldn’t make it to work.
            </p>
        </positive-example>
        
        <negative-example>
            <h3>Story</h3>
            <p>Bob bought an oil change business on a busy highway. Very few people came to his business. He decided to advertise his business in the local paper. He ran an ad that offered discounts and promotions. His business picked up tremendously.
            
            <h3>Response</h3>
             (Too long)
             Bob bought an oil change business on a busy highway and implemented various promotions and advertising and his business picked up tremendously.
            </p>

        </negative-example>


    </crowd-instructions>

    <p>Write a one sentence summary of the following short story:</p>

    <!-- Your contexts and intents will be substituted for the "context" and "intent" variables when you 
           publish a batch with an input file containing multiple contexts and intents -->
    <p><strong>Story: </strong>${story}</p>

    <crowd-input name="summary" placeholder="Type your single sentence summary..." required></crowd-input>
</crowd-form>
